package cn.zyq.ykb.controller.h5.config;

import org.springframework.security.access.prepost.PreAuthorize;
import cn.zyq.ykb.system.ry.util.poi.ExcelUtil;
import cn.zyq.ykb.system.common.BaseController;
import cn.zyq.ykb.system.annotation.Log;
import cn.zyq.ykb.system.ry.enums.BusinessType;
import cn.zyq.ykb.beans.config.ConfigRecord;
import cn.zyq.ykb.service.config.ConfigRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import cn.zyq.ykb.system.common.BaseController;
import cn.zyq.ykb.system.common.PageParam;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 操作记录Controller
 *
 * @author SystemAuth
 * @date 2023-05-24
 */

@RestController(value = "H5ConfigRecordController")
@RequestMapping("/api/configRecord")
@Api(tags = "操作记录接口")
public class ConfigRecordController extends BaseController {

    @Autowired
    private ConfigRecordService configRecordService;

    /**
     * 查询操作记录列表
     */
    @ApiOperation(value = "操作记录列表", response = ConfigRecord.class)
    @PostMapping("/list")
    public Object list(@RequestBody PageParam pageParam) {
        return this.configRecordService.selectConfigRecordList(pageParam,this.getLoginUser());
    }

    /**
     * 获取刷新/置顶记录
     */
    @ApiOperation(value = "获取刷新/置顶记录")
    @GetMapping("/getRecord")
    public Object getRecord() {
        return this.configRecordService.getRecord(this.getLoginUser());
    }
}
